package com.li.core.bean;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.li.core.actionBase.ActionBase;
import com.li.core.factory.ServiceFactory;

public class BeanBase {
	protected static Log log = LogFactory.getLog(BeanBase.class);
	
	protected Object getBean(String beanid) {
		Object result = null;
		log.debug("获取bean"+beanid+"开始");
		result = ServiceFactory.getBean(beanid);
		if (result == null) {
			if (log.isInfoEnabled()) {
				log.info("没有找到bean");
			}
			throw new RuntimeException("没有找到bean");
		}
		return result;
	}
}
